import 'package:flutter/material.dart';

import 'Appcolor.dart';

class Kbutton extends StatelessWidget {
  final Function() ontap;
  final String text;
  const Kbutton({
    super.key,
    required this.ontap,
    required this.text,
  });

  @override
  Widget build(BuildContext context) {
    return SizedBox(
      width: double.infinity,
      child: TextButton(
          style: ButtonStyle(
            padding: MaterialStatePropertyAll(EdgeInsets.all(15)),
            backgroundColor: MaterialStatePropertyAll(buttomBgc),
          ),
          onPressed: ontap,
          child: Text(
            text,
            style: TextStyle(fontSize: 14, color: Colors.white),
            textAlign: TextAlign.start,
          )),
    );
  }
}
